<!DOCTYPE html>
<html>
<head>
    <title>Execution Context Example 5</title>
    <script type="text/javascript">
          
        function add(num1, num2) {
            sum = num1 + num2;
            return sum;
        }
        
        var result = add(10, 20);  //30
        alert(sum);                //30

      
    </script>

</head>
<body>
  
</body>
</html>